package com.yjt.fresh.adpater;

import android.content.Intent;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yjt.fresh.R;
import com.yjt.fresh.activity.AtyApplyBack;
import com.yjt.fresh.bean.BeanOrder;
import com.yjt.fresh.constant.MyConstants;

import java.util.List;

import butterknife.BindView;

/**
 * @author mcc
 * @date 2018/6/10
 */

public class AdpRvFrgAfterSaleApplyChild extends BaseQuickAdapter<BeanOrder.GOODSBean, BaseViewHolder> {
    public AdpRvFrgAfterSaleApplyChild(int layoutResId, @Nullable List<BeanOrder.GOODSBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, final BeanOrder.GOODSBean item) {
        ImageView mIv=helper.getView(R.id.ivAppRecycleItemFrgAfterSaleApplyContent);

        TextView mTvTitle=helper.getView(R.id.tvAppRecycleItemFrgAfterSaleApplyContentTitle);

        TextView mTvType=helper.getView(R.id.tvAppRecycleItemFrgAfterSaleApplyContentType);

        TextView mTvNewPrice=helper.getView(R.id.tvAppRecycleItemFrgAfterSaleApplyContentNewPrice);

        TextView mTvApply=helper.getView(R.id.tvAppRecycleItemFrgAfterSaleApplyContentApply);

        Glide.with(mContext).load(item.getSKU_IMG()).into(mIv);
        mTvTitle.setText(item.getTITLE());
        mTvType.setText(item.getSIZE());
        mTvNewPrice.setText(item.getSINGLE_PRICE()*item.getBUYCOUNT()+"");
        helper.addOnClickListener(R.id.tvAppRecycleItemFrgAfterSaleApplyContentApply);

    }
}
